Skip to content

fix(opencode): prefer semantic ACP tool title and input before completion#23948

Open
nizheming wants to merge 1 commit intoanomalyco:devfrom
nizheming:fix/acp-semantic-tool-title-input
Open

fix(opencode): prefer semantic ACP tool title and input before completion#23948
nizheming wants to merge 1 commit intoanomalyco:devfrom
nizheming:fix/acp-semantic-tool-title-input

Conversation

@nizheming
Copy link
Copy Markdown

Issue for this PR

Closes #23947

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This fixes ACP tool progress events using generic metadata before completion.

tool_call and tool_call_update(status=in_progress) were sending part.tool and sometimes empty input, so ACP clients showed generic labels like bash or skill while the tool was running.

This change makes ACP prefer semantic state before completion:

  • title: part.state.title ?? part.tool
  • rawInput: part.state.input ?? {}
  • locations: recomputed from the best available input

Completed behavior is unchanged.

How did you verify your code works?

  • added ACP regression coverage in packages/opencode/test/acp/event-subscription.test.ts
  • ran bun test test/acp/event-subscription.test.ts from packages/opencode
  • ran bun typecheck from packages/opencode
  • pre-push hook also ran the repo typecheck successfully during branch push

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@nizheming nizheming force-pushed the fix/acp-semantic-tool-title-input branch from be0ae80 to 7df021a Compare April 23, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACP tool_call/tool_call_update use generic titles while running

1 participant